package com.hl.secondHand.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hl.secondHand.common.vo.EasyOrder;
import com.hl.secondHand.entity.Orders;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hl
 * @since 2021-06-08
 */
@Component
public interface OrdersMapper extends BaseMapper<Orders> {

    @Select("select o.id,o.gid,o.address,o.remarks,g.name,g.image,g.amount from orders o,goods g where o.sid = #{sid} and o.gid = g.id order by o.created_date desc")
    public List<EasyOrder> getEasyOrder(int sid);
}
